Fix orchestration discriminator in single-instance purge requests - #279
Open
andystaples wants to merge 2 commits into
Open
andystaples wants to merge 2 commits into
andystaples wants to merge 2 commits into
Conversation
Set isOrchestration on sync and async purge requests, cover inherited provider APIs and compatibility alias, and document the correction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted protocol correction is correct, comprehensively tested, and appropriately documented.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes #276 by correctly identifying single-instance purge requests as orchestration purges.
Changes:
- Sets
isOrchestration=Truefor synchronous and asynchronous clients. - Adds regression coverage across core and provider clients.
- Documents the fix in all applicable changelogs.
| File | Description |
|---|---|
durabletask/client.py |
Corrects both purge request paths. |
tests/durabletask/test_purge.py |
Tests requests, results, recursion, and errors. |
tests/durabletask-azuremanaged/test_dts_purge.py |
Verifies inherited Azure Managed behavior. |
tests/azure-functions-durable/test_client_compat.py |
Verifies Functions clients and compatibility alias. |
CHANGELOG.md |
Documents the core fix. |
durabletask-azuremanaged/CHANGELOG.md |
Documents provider impact. |
azure-functions-durable/CHANGELOG.md |
Documents Functions provider impact. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Bernd Verst (berndverst)
previously approved these changes
Oct 1, 2026
Bernd Verst (berndverst)
left a comment
Member
There was a problem hiding this comment.
Looks good. This corrects the orchestration discriminator in both client paths while preserving signatures, recursive defaults, result semantics, and RPC error propagation. Provider release coordination is documented, with no public API break or new Python-version requirement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #276.
Set
isOrchestration=TrueonPurgeInstancesRequestin both synchronous and asynchronouspurge_orchestration()methods. The previously omitted Boolean defaulted to false, the entity discriminator. This corrects the wire request; it does not imply every backend previously rejected the request or failed deletion. Equivalent correction: microsoft/durabletask-go#165.Add request-level regressions covering both core clients, both Azure Managed clients, both Azure Functions clients, and the Functions
purge_instance_history()compatibility alias. Cover default recursion and explicit true/false overrides, deletion-count and three-state completion conversion, and unchanged RPC exception propagation. Polling, timeouts, completion semantics, and worker behavior are unchanged.Update all three applicable Unreleased changelogs.